// pages/card/card.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    navList: [{
        title: '充值管理',
        showIndex: false,
        inner: [{
            navName: '水卡充值',
            url: '../cardApply/cardApply?from=2'
          },
          {
            navName: '充值记录',
            url: '../rechargeRecord/rechargeRecord'
          }
        ],
      },
      {
        title: '普通水卡管理',
        showIndex: false,
        inner: [{
            navName: '我的水卡',
            url: '../fictitiousCard/fictitiousCard'
          },
          {
            navName: '水卡开卡',
            url: '../cardApply/cardApply?from=1'
          },
          {
            navName: '水卡开卡记录',
            url: '../applyList/applyList'
          },


          {
            navName: '线上实体卡申请记录',
            url: '../examineOnline/examineOnline'
          },

        ]
      },
      {
        title: '特殊水卡管理',
        showIndex: false,
        inner: [{
            navName: '水卡开卡',
            url: '../specialApply/specialApply'
          }, {
            navName: '水卡开卡记录',
            url: '../specialApplyList/specialApplyList'
          },

          // {navName: '水卡年审'},

        ]
      },
      {
        title: '卡库管理',
        showIndex: false,
        inner: [{
            navName: '卡库',
            url: '../cardList/cardList'
          },
          {
            navName: '水卡入库',
            url: '../cardList/cardAdd?type=0'
          },
          {
            navName: '水卡批量入库',
            url: '../cardList/cardAdd?type=1'
          }
        ]
      },
    ],
  },



  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  },
  // 展开折叠选择  
  panel: function (e) {
    var that = this;
    var i = e.currentTarget.dataset.index
    var nv = that.data.navList;
    if (nv[i].showIndex == false) {
      nv[i].showIndex = true
    } else {
      nv[i].showIndex = false
    }
    that.setData({
      navList: nv
    })
  }
})